package tom.client.admin;

import java.util.List;

import tom.shared.AppUser;
import tom.shared.Company;
import tom.shared.Program;
import tom.shared.PostCode;

import com.google.gwt.user.client.rpc.AsyncCallback;

public interface ServiceAsync {

	void deleteAppUser(String userName, AsyncCallback<Boolean> callback);

	void selectMyInfo(String userName, AsyncCallback<AppUser> callback);

	void updatePassword(String userName, String oldPswd, String newPswd,
			AsyncCallback<Boolean> callback);

	void updateAppUser(String userName, String fullName, String descript,
			String comCode, Integer level, AsyncCallback<Boolean> callback);

	void createUser(String userName, String fullName, String descript,
			String comCode, Integer level, AsyncCallback<Boolean> callback);

	void selectCompany(String comCode, AsyncCallback<Company> callback);

	void deleteCompany(String comCode, AsyncCallback<Boolean> callback);

	void insertCompany(Company record, AsyncCallback<Boolean> callback);

	void updateCompany(Company record, AsyncCallback<Boolean> callback);

	void selectModule(AsyncCallback<List<String>> callback);

	void selectForm(String formId, AsyncCallback<Program> callback);

	void deleteForm(String formid, AsyncCallback<Boolean> callback);

	void insertForm(Program record, AsyncCallback<Boolean> callback);

	void updateForm(Program record, AsyncCallback<Boolean> callback);

	void deleteWorking(String userName, String comCode,
			AsyncCallback<Boolean> callback);

	void selectWorking(String userName, AsyncCallback<List<String>> callback);

	void selectPermission(String userName, String comCode, AsyncCallback<List<Program>> callback);

	void deletePermission(String userName, String comCode, String formId,
			AsyncCallback<Boolean> callback);

	void insertPermission(String userName, String comCode, String formId, Integer level,
			AsyncCallback<Boolean> callback);

	void selectAvailForm(String userName, String comCode, AsyncCallback<List<Program>> callback);

	void selectPostCode(Integer id, AsyncCallback<PostCode> callback);

	void deletePostCode(Integer id, AsyncCallback<Boolean> callback);

	void insertPostCode(PostCode record, AsyncCallback<Boolean> callback);

	void updatePostCode(PostCode record, AsyncCallback<Boolean> callback);

	void updatePassword2(String userName, String oldPswd, String newPswd,
			AsyncCallback<Boolean> callback);

	void insertWorking(String userName, String comCode,
			AsyncCallback<Boolean> callback);

}
